﻿CREATE TABLE [dbo].[tblStg_Alerts]
(
	[alt_id] [bigint] IDENTITY(1,1) NOT NULL,
	[alt_ssd_id] [int] NOT NULL,
	[alt_name] [sysname] NOT NULL,
	[alt_severity] [int] NOT NULL,
	[alt_message_id] [int] NOT NULL,
	[alt_enabled] [tinyint] NOT NULL,
	[alt_occurrence_count] [int] NOT NULL,
	[alt_log_date] [smalldatetime] NOT NULL, 
    CONSTRAINT [PK_tblStg_Alerts] PRIMARY KEY ([alt_id]), 
    CONSTRAINT [FK_tblStg_Alerts_tblMSX_server_discovery] FOREIGN KEY ([alt_ssd_id]) REFERENCES [tblMSX_server_discovery]([ssd_id])
)
GO

CREATE INDEX [IX_tblStg_Alerts_ssd_id] ON [dbo].[tblWH_Alerts] ([alt_ssd_id])
GO